1. Field of the Invention
The present invention relates to an image processing method, and more particularly to an image brightness correction method for adjusting an image to obtain a consistent brightness gain value.
2. Related Art
As camera devices having been increasingly prevailing, they are more and more widely used in various applications. When a camera device is used for shooting an image, the shooting brightness may directly affect the quality and recognizability of the final image. Especially, when the light in the shooting site is inadequate or the exposure time fails to meet the requirement of the safety shutter, a flash lamp is required to compensate the brightness of the shooting environment. Therefore, the brightness of the shot image is compensated by the flash lamp, such that the shot image may not have any unrecognizable area due to the excessively inadequate brightness.
FIG. 1A is a flow chart of a conventional camera device employing a flash lamp to shoot an image. Referring to FIG. 1A, a method for shooting an image by a conventional camera device employing a flash lamp includes the following steps. First, a pre-flash is fired and a pre-flash image is shot (Step S110). An automatic exposure time of the camera device is captured (Step S120). A main flash duration is estimated according to the pre-flash image and the automatic exposure time (Step S130). Then, a main flash is fired according to the main flash duration, and a raw image is shot (Step S140). Finally, an image processing is performed on the raw image, so as to output a preset image file (Step S150). Through the above steps, when capturing an image, the camera device can determine the occasion when a flash lamp is needed for image shooting.
However, the flash lamp of the camera device works at a different level each time. The stability of the flash lamp depends on a capacitance of the flash lamp, and the smaller the capacitance of the flash lamp is, the poorer its discharge stability will be. When the discharge stability is undesirable, the brightness of the image that is shot each time is not uniform. For example, FIG. 1B is a data diagram showing brightness gain values of a conventional camera device when shooting an image through using a flash lamp. Referring to FIG. 1B, the experimental data are brightness gain values of images shot at the same scene and brightness but with different object distances. For example, when the images are shot at 0.3 m, the brightness gain values of images shot in several experiments have a difference of about 30%, that is, (173.35−131.51)/154.134, Though it is possible to compensate the brightness gain value difference of the image shot each time by replacing a flash lamp with a higher stability, the unit prices of components in the flash lamp with a higher stability are much higher, and it still cannot guarantee that the image shot each time achieves the same brightness gain value. In other words, the techniques in the prior art cannot overcome the problem that the output images have non-uniform brightness due to inconsistent flash levels of the flash lamp.